Add Aspire integration tests, container smoke test, and rename endpoints to _microstack - #10
Merged
Merged
Conversation
- Add OutputType Exe to both test csproj files (required by xunit v3) - Change IAsyncLifetime methods from Task to ValueTask (42 test files) - Replace Task.CompletedTask with ValueTask.CompletedTask in DisposeAsync - Replace Assert.SkipUnless with conditional TestContext.Current.CancelCurrentTest() in LambdaTests
Introduces AppHost project with AddMicroStack and a test project with 5 smoke tests verifying connection string, health endpoint, and basic S3/SQS/SNS operations via DistributedApplicationTestingBuilder.
Aligns internal API paths (health, reset, config, lambda-layers) with the project rename from MiniStack to MicroStack.
Remove unused using directives flagged by AOT trimming analysis. Add TestingPlatformDotnetTestSupport and OutputType Exe for xunit v3 MTP.
Publishes native AOT binary via WSL, builds Docker image with debian-slim, starts the container, and verifies health endpoint responds with 200 OK. Fixes: register MicroStackJsonContext with ConfigureHttpJsonOptions so Results.Ok() works under native AOT (source-generated serialization). Also adds docker.io/ prefix to ContainerBaseImage to suppress CONTAINER2020.
Replace VSTest --logger flag with MTP --report-trx to fix test execution on .NET 10 SDK where VSTest is no longer supported.
The .NET 10 SDK requires global.json test runner config instead of the TestingPlatformDotnetTestSupport MSBuild property. Update dotnet test command to use the new MTP-native syntax.
Use global.json MTP runner config. Exclude ContainerSmokeTests which requires WSL. Remove TRX reporting (not needed for xunit v3 MTP).
The Aspire tests launch MicroStack as a hosted process which requires a running instance. These are intended for local development only.
…exit code 8 from empty Aspire test DLL
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds two new test suites and renames all internal API endpoints from
_ministackto_microstackto align with the project rename.Aspire integration tests — 5 smoke tests using
DistributedApplicationTestingBuilderthat verify connection string injection, health endpoint, and basic S3/SQS/SNS operations against a real MicroStack instance.Container smoke test — publishes a native AOT binary via WSL, builds a Docker image (debian-slim), starts the container, and verifies the health endpoint responds 200 OK with the expected payload. This caught and fixed a real bug:
Results.Ok()in minimal APIs was missing the source-generated JSON context, causing 500 errors under native AOT.Also migrates all test projects from xunit v2 to xunit v3 (MTP runner).
Reviewer focus
src/MicroStack/Program.cs—ConfigureHttpJsonOptionsregistration (native AOT fix)tests/MicroStack.Tests/ContainerSmokeTests.cs— WSL-based container build/test approachtests/MicroStack.Aspire.Tests/— Aspire test structure and smoke test coverage_ministack→_microstackacross ~60 filesRisk / impact
/_ministack/*to/_microstack/*. Any external tooling or scripts hitting these endpoints will need updating.IAsyncLifetimefromTasktoValueTaskreturn types.